﻿<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.FakeUser"
    xmlns:SampleData1="clr-namespace:Expression.Blend.SampleData.FakeMagnets" xmlns:SampleData2="clr-namespace:Expression.Blend.SampleData.FakeCategories"
    xmlns:SampleData3="clr-namespace:Expression.Blend.SampleData.MagnetComments" xmlns:myBoard_App_Components_MagnetsStore="clr-namespace:myBoard.App.Components.MagnetsStore"
    x:Class="myBoard.App.App"
    StartupUri="Main.xaml"
    >
    <Application.Resources>
         
    	
         
    	<SampleData3:MagnetComments x:Key="MagnetComments" d:IsDataSource="True"/>
         
    	
         
    	<SampleData1:FakeMagnets x:Key="FakeMagnets" d:IsDataSource="True"/>
    	<SampleData2:FakeCategories x:Key="FakeCategories" d:IsDataSource="True"/>
         
    	
         
    	<SampleData:FakeUser x:Key="FakeUser" d:IsDataSource="True"/>
         
    	
         
    	<LinearGradientBrush x:Key="TextBoxBorder" EndPoint="0,20" StartPoint="0,0" MappingMode="Absolute">
    		<GradientStop Color="#ABADB3" Offset="0.05"/>
    		<GradientStop Color="#E2E3EA" Offset="0.07"/>
    		<GradientStop Color="#E3E9EF" Offset="1"/>
    	</LinearGradientBrush>
    	<Style x:Key="StoreTextboxStyle1" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="AllowDrop" Value="true"/>
    		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type TextBox}">
    					<Border Width="Auto" Height="Auto" BorderBrush="#FF454545" BorderThickness="1" CornerRadius="4,4,4,4">
    						<Border.Background>
    							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    								<GradientStop Color="Gainsboro" Offset="0"/>
    								<GradientStop Color="Gainsboro" Offset="1"/>
    								<GradientStop Color="#FFF0F0F0" Offset="0.282"/>
    							</LinearGradientBrush>
    						</Border.Background>
    						<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost" Margin="7,2,7,0" VerticalAlignment="Top"/>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="ButtonFocusVisual">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Rectangle SnapsToDevicePixels="true" Margin="2" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
    		<GradientStop Color="#F3F3F3" Offset="0"/>
    		<GradientStop Color="#EBEBEB" Offset="0.5"/>
    		<GradientStop Color="#DDDDDD" Offset="0.5"/>
    		<GradientStop Color="#CDCDCD" Offset="1"/>
    	</LinearGradientBrush>
    	<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
    	<Style x:Key="StoreButtonStyle1" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Border x:Name="border" BorderThickness="1" CornerRadius="4,4,4,4" BorderBrush="#FF9D9D9D" MinWidth="0" Height="Auto">
    						<Border.Background>
    							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    								<GradientStop Color="#FFA3E083" Offset="1"/>
    								<GradientStop Color="#FFB3F490" Offset="0"/>
    								<GradientStop Color="#FF3C7C43" Offset="0.51"/>
    							</LinearGradientBrush>
    						</Border.Background>
    						<Grid Width="Auto" Height="Auto">
    							<Grid.RowDefinitions>
    								<RowDefinition Height="0.505*"/>
    								<RowDefinition Height="0.495*"/>
    							</Grid.RowDefinitions>
    							<ContentPresenter d:LayoutOverrides="Width, Height" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.RowSpan="2"/>
    							<Border Margin="0,0,0,0" Grid.RowSpan="1" Opacity="1" CornerRadius="4,4,0,0">
    								<Border.Background>
    									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    										<GradientStop Color="#7FFFFFFF" Offset="0"/>
    										<GradientStop Color="#33FFFFFF" Offset="1"/>
    									</LinearGradientBrush>
    								</Border.Background>
    							</Border>
    						</Grid>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsKeyboardFocused" Value="true"/>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Visibility" TargetName="border" Value="Collapsed"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="PictureButton" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Border x:Name="_root" HorizontalAlignment="Center" VerticalAlignment="Top" Width="45" Height="45" BorderThickness="1,1,1,1" Margin="0,0,0,0" CornerRadius="5,5,5,5" BorderBrush="#FF000000">
    						<Border.Background>
    							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    								<GradientStop Color="#FF262626" Offset="0"/>
    								<GradientStop Color="#FF393939" Offset="1"/>
    							</LinearGradientBrush>
    						</Border.Background>
    						<Grid>
    							<Path x:Name="clipZone" Fill="#1DFFFFFF" Stretch="Fill" Stroke="{x:Null}" Visibility="Visible" Data="M0,4.305 C0,1.9274142 1.9274142,0 4.305,0 L38.695,0 C41.072586,0 43,1.9274142 43,4.305 L43,38.695 C43,41.072586 41.072586,43 38.695,43 L4.305,43 C1.9274142,43 0,41.072586 0,38.695 z"/>
    							<Rectangle Fill="#FFFFFFFF" Stroke="{x:Null}" RadiusX="4.305" RadiusY="4.305" Visibility="Collapsed"/>
    							<ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Clip="{Binding Data, ElementName=clipZone, Mode=Default}"/>
    							<Ellipse Stroke="{x:Null}" Width="62" Height="38" HorizontalAlignment="Center" Margin="0,-16,0,0" VerticalAlignment="Top" Clip="M9.5,20.305 C9.5,17.927414 11.427414,16 13.805,16 L48.195,16 C50.572586,16 52.5,17.927414 52.5,20.305 L52.5,54.695 C52.5,57.072586 50.572586,59 48.195,59 L13.805,59 C11.427414,59 9.5,57.072586 9.5,54.695 z">
    								<Ellipse.Fill>
    									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    										<GradientStop Color="#CCFFFFFF" Offset="0.25"/>
    										<GradientStop Color="#31FFFFFF" Offset="1"/>
    									</LinearGradientBrush>
    								</Ellipse.Fill>
    							</Ellipse>
    						</Grid>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsKeyboardFocused" Value="true"/>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="#ADADAD"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="OpenFileTbxStyle" BasedOn="{x:Null}" TargetType="{x:Type TextBox}">
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="AllowDrop" Value="true"/>
    		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type TextBox}">
    					<Border Width="Auto" Height="Auto" BorderBrush="#FF454545" BorderThickness="2,2,2,2" CornerRadius="4,4,4,4">
    						<Border.Background>
    							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    								<GradientStop Color="#FFC6C6C6" Offset="0"/>
    								<GradientStop Color="#FFE0E0E0" Offset="1"/>
    								<GradientStop Color="#FFC9C9C9" Offset="0.282"/>
    							</LinearGradientBrush>
    						</Border.Background>
    						<Microsoft_Windows_Themes:ListBoxChrome SnapsToDevicePixels="true" HorizontalAlignment="Left" Margin="7,0,0,0" x:Name="Bd" VerticalAlignment="Center" Width="Auto" Height="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderFocused="{TemplateBinding IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding IsMouseOver}">
    							<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost"/>
    						</Microsoft_Windows_Themes:ListBoxChrome>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="TransparentButtonStyle" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Border BorderBrush="{x:Null}" BorderThickness="1" Background="#00000000">
    						<ContentPresenter Height="Auto"/>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsKeyboardFocused" Value="true"/>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="#ADADAD"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
         
    	
         
    	<Style x:Key="PasswordBoxStyle" TargetType="{x:Type PasswordBox}">
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
    		<Setter Property="FontFamily" Value="Times New Roman"/>
    		<Setter Property="PasswordChar" Value="●"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="HorizontalContentAlignment" Value="Left"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    		<Setter Property="AllowDrop" Value="true"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type PasswordBox}">
    					<Border Width="Auto" Height="Auto" BorderBrush="#FF454545" BorderThickness="1" CornerRadius="4,4,4,4" d:LayoutOverrides="Width">
    						<Border.Background>
    							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    								<GradientStop Color="Gainsboro" Offset="0"/>
    								<GradientStop Color="Gainsboro" Offset="1"/>
    								<GradientStop Color="#FFF0F0F0" Offset="0.282"/>
    							</LinearGradientBrush>
    						</Border.Background>
    						<ScrollViewer SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" x:Name="PART_ContentHost" Margin="7,0" VerticalAlignment="Center"/>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<DataTemplate x:Key="MagnetDataTemplate">
    		<Grid Width="280" Margin="0,0,0,20">
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="0.22*"/>
    				<ColumnDefinition Width="0.63*"/>
				</Grid.ColumnDefinitions>
    			<Button Margin="5,0" VerticalAlignment="Stretch" Width="50" Height="50" Style="{DynamicResource TransparentButtonStyle}" Cursor="Hand" Command="{Binding SelectMagnetCmd, Mode=Default}" CommandParameter="{Binding Mode=OneWay}">
    				<Image Source="{Binding ThumbnailUrl, Mode=Default}" Width="Auto" Height="Auto" VerticalAlignment="Stretch" Margin="0"/>
    			</Button>
    			<StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center" Margin="5,0,0,0" Grid.ColumnSpan="1">
    				<TextBlock Margin="0" VerticalAlignment="Center" Foreground="#FF616161" Text="{Binding Name, Mode=Default}" TextWrapping="Wrap" d:LayoutOverrides="Width" FontFamily="Candara" FontSize="12" FontWeight="Bold"/>
    				<myBoard_App_Components_MagnetsStore:Ratings Margin="0,10,0,0" MaxRating="5" Rating="{Binding Rating, Mode=Default}"/>
    			</StackPanel>
    			<Grid HorizontalAlignment="Right" Grid.Column="1" Width="40" Height="40" VerticalAlignment="Top">
    				<Path Stretch="Fill" Stroke="{x:Null}" Data="M0,0 L40,0 40,40 z">
    					<Path.Fill>
    						<RadialGradientBrush RadiusX="1.178" RadiusY="1.178">
    							<GradientStop Color="#FF3C7C43" Offset="0.5"/>
    							<GradientStop Color="#FF50C15D" Offset="1"/>
    							<GradientStop Color="#FF50C15D"/>
    						</RadialGradientBrush>
    					</Path.Fill>
    					<Path.Effect>
    						<DropShadowEffect BlurRadius="2" ShadowDepth="2" Opacity="0.5" Direction="244"/>
    					</Path.Effect>
    				</Path>
    				<TextBlock Text="NEW" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" FontFamily="Candara" Foreground="White" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" FontWeight="Bold" Margin="14.351,5.675,0.351,19.675">
    					<TextBlock.RenderTransform>
    						<TransformGroup>
    							<ScaleTransform/>
    							<SkewTransform/>
    							<RotateTransform Angle="45"/>
    							<TranslateTransform/>
    						</TransformGroup>
    					</TextBlock.RenderTransform>
    				</TextBlock>
    			</Grid>
    		</Grid>
    	</DataTemplate>
    	<SolidColorBrush x:Key="CheckBoxFillNormal" Color="#F4F4F4"/>
    	<SolidColorBrush x:Key="CheckBoxStroke" Color="#8E8F8F"/>
    	<Style x:Key="EmptyCheckBoxFocusVisual">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="1" SnapsToDevicePixels="true"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="CheckRadioFocusVisual">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="14,0,0,0" SnapsToDevicePixels="true"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="InvertedCheckbox" TargetType="{x:Type CheckBox}">
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="Background" Value="{StaticResource CheckBoxFillNormal}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource CheckBoxStroke}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="FocusVisualStyle" Value="{StaticResource EmptyCheckBoxFocusVisual}"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type CheckBox}">
    					<BulletDecorator SnapsToDevicePixels="true" Background="Transparent">
    						<BulletDecorator.Bullet>
    							<Microsoft_Windows_Themes:BulletChrome Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" IsChecked="{TemplateBinding IsChecked}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"/>
    						</BulletDecorator.Bullet>
    						<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True"/>
    					</BulletDecorator>
    					<ControlTemplate.Triggers>
    						<Trigger Property="HasContent" Value="true">
    							<Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/>
    							<Setter Property="Padding" Value="4,0,0,0"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
         
    	
         
    </Application.Resources>
</Application>
